<?php
use Core\Config;
use Zend\Json\Json;

$paramArr = $this->paramArr;
$pageItem = $this->pageItem;

$allUrlParam = Config::getAllUrlParam();
$assocArr = array();
if($pageItem){
   $obj =  Json::decode($pageItem->params);
}

foreach ($paramArr as $aParam) {
    echo '<div class="a_param_chooser">
    <div class="left label_120" ><span>'.$aParam.'</span></div>
    <div class="left" style="padding:10px">
        <select class="cboUrlParam">';
    $selectedVal = $obj->$aParam;

    foreach ($allUrlParam as $key => $val) {
        $selected = '';
        if($selectedVal == $key)
            $selected = 'selected';
        echo '<option '.$selected.' value="'.$key.'">'.$val.'</option>';
    }
    echo '</select>
        </div>
        <div class="clear"></div>
    </div>';
}

?>

